package com.example.ecs.components.physics;

import com.example.ecs.core.Component;

/**
 * BoundaryComponent类表示实体的边界组件
 * 当实体碰撞到边界时，会根据设置的边向量取反速度
 */
public class BoundaryComponent extends Component {
    public boolean bounceOnCollision = true; // 是否在碰撞时反弹
    public int minX, minY, maxX, maxY; // 边界范围
    
    public BoundaryComponent(int minX, int minY, int maxX, int maxY) {
        this.minX = minX;
        this.minY = minY;
        this.maxX = maxX;
        this.maxY = maxY;
    }
}